﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    abstract class Calculate
    {
        //4、在主类中添加一个方法，形参为父类对象，根据传递实参的类型，调用方法，
        //实现计算和显示结果。
        protected int a;
        protected int b;

        public int A { get => a; set => a = value; }
        public int B { get => b; set => b = value; }
        public Calculate(int a, int b)
        {
            this.a = a;
            this.b = b;
        }
        public abstract void DisplayResult();


       
    }
}
